<template>
    <div>
        <Modal v-model="modal.search" title="高级搜索" width="1020">
            <Form ref="searchForm" :model="searchForm" :label-width="120">
                <Row>
	<i-col span="12">
	<FormItem label="商品编号"><Row>
	<i-col span="11">
	<FormItem prop="goodsInfoIdMin">
	<InputNumber v-model="searchForm.goodsInfoIdMin" placeholder="请输入开始商品编号" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="goodsInfoIdMax">
	<InputNumber v-model="searchForm.goodsInfoIdMax" placeholder="请输入结束商品编号" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="店铺编号"><Row>
	<i-col span="11">
	<FormItem prop="goodsInfoShopIdMin">
	<InputNumber v-model="searchForm.goodsInfoShopIdMin" placeholder="请输入开始店铺编号" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="goodsInfoShopIdMax">
	<InputNumber v-model="searchForm.goodsInfoShopIdMax" placeholder="请输入结束店铺编号" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="类目编号"><Row>
	<i-col span="11">
	<FormItem prop="goodsInfoCategoryIdMin">
	<InputNumber v-model="searchForm.goodsInfoCategoryIdMin" placeholder="请输入开始类目编号" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="goodsInfoCategoryIdMax">
	<InputNumber v-model="searchForm.goodsInfoCategoryIdMax" placeholder="请输入结束类目编号" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="商品标题" prop="goodsInfoTitle" label-for="goodsInfoTitle">
	<Input v-model="searchForm.goodsInfoTitle" element-id="goodsInfoTitle" placeholder="请输入商品标题" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="商品图片" prop="goodsInfoPicUrl" label-for="goodsInfoPicUrl">
	<Input v-model="searchForm.goodsInfoPicUrl" element-id="goodsInfoPicUrl" placeholder="请输入商品图片" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="商品品牌" prop="goodsInfoBrand" label-for="goodsInfoBrand">
	<Input v-model="searchForm.goodsInfoBrand" element-id="goodsInfoBrand" placeholder="请输入商品品牌" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="图文详情" prop="goodsInfoIntro" label-for="goodsInfoIntro">
	<Input v-model="searchForm.goodsInfoIntro" element-id="goodsInfoIntro" placeholder="请输入图文详情" clearable/>
</FormItem>
</i-col>
<i-col span="12">
<FormItem label="上架状态" prop="goodsInfoShelfStatus">
    
        <Select v-model="searchForm.goodsInfoShelfStatus" placeholder="上架状态" filterable clearable>
          <Option
            v-for="(option, index) in goodsInfoShelfStatusSelect"
            :value="option.value"
            :key="index"
          >{{option.displayValue}}</Option>
        </Select>
    
</FormItem>
	
</i-col>
<i-col span="12">
	<FormItem label="销量"><Row>
	<i-col span="11">
	<FormItem prop="goodsInfoSaleCountMin">
	<InputNumber v-model="searchForm.goodsInfoSaleCountMin" placeholder="请输入开始销量" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="goodsInfoSaleCountMax">
	<InputNumber v-model="searchForm.goodsInfoSaleCountMax" placeholder="请输入结束销量" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="点击数"><Row>
	<i-col span="11">
	<FormItem prop="goodsInfoClickCountMin">
	<InputNumber v-model="searchForm.goodsInfoClickCountMin" placeholder="请输入开始点击数" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="goodsInfoClickCountMax">
	<InputNumber v-model="searchForm.goodsInfoClickCountMax" placeholder="请输入结束点击数" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="店铺Logo" prop="goodsShopLogo" label-for="goodsShopLogo">
	<Input v-model="searchForm.goodsShopLogo" element-id="goodsShopLogo" placeholder="请输入店铺Logo" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="店铺标题" prop="goodsShopTitle" label-for="goodsShopTitle">
	<Input v-model="searchForm.goodsShopTitle" element-id="goodsShopTitle" placeholder="请输入店铺标题" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="店铺等级"><Row>
	<i-col span="11">
	<FormItem prop="goodsShopLevelMin">
	<InputNumber v-model="searchForm.goodsShopLevelMin" placeholder="请输入开始店铺等级" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="goodsShopLevelMax">
	<InputNumber v-model="searchForm.goodsShopLevelMax" placeholder="请输入结束店铺等级" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="SKU编号"><Row>
	<i-col span="11">
	<FormItem prop="goodsSkuIdMin">
	<InputNumber v-model="searchForm.goodsSkuIdMin" placeholder="请输入开始SKU编号" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="goodsSkuIdMax">
	<InputNumber v-model="searchForm.goodsSkuIdMax" placeholder="请输入结束SKU编号" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="SKU图片" prop="goodsSkuPicUrl" label-for="goodsSkuPicUrl">
	<Input v-model="searchForm.goodsSkuPicUrl" element-id="goodsSkuPicUrl" placeholder="请输入SKU图片" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="售卖标题" prop="goodsSkuTitle" label-for="goodsSkuTitle">
	<Input v-model="searchForm.goodsSkuTitle" element-id="goodsSkuTitle" placeholder="请输入售卖标题" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="原价"><Row>
	<i-col span="11">
	<FormItem prop="goodsSkuPriceMin">
	<InputNumber v-model="searchForm.goodsSkuPriceMin" placeholder="请输入开始原价" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="goodsSkuPriceMax">
	<InputNumber v-model="searchForm.goodsSkuPriceMax" placeholder="请输入结束原价" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="销售价"><Row>
	<i-col span="11">
	<FormItem prop="goodsSkuSalePriceMin">
	<InputNumber v-model="searchForm.goodsSkuSalePriceMin" placeholder="请输入开始销售价" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="goodsSkuSalePriceMax">
	<InputNumber v-model="searchForm.goodsSkuSalePriceMax" placeholder="请输入结束销售价" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="库存"><Row>
	<i-col span="11">
	<FormItem prop="goodsSkuStockCountMin">
	<InputNumber v-model="searchForm.goodsSkuStockCountMin" placeholder="请输入开始库存" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="goodsSkuStockCountMax">
	<InputNumber v-model="searchForm.goodsSkuStockCountMax" placeholder="请输入结束库存" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>
<i-col span="12">
		<FormItem label="上架状态" prop="goodsSkuShelfStatus">
		    
		        <Select v-model="searchForm.goodsSkuShelfStatus" placeholder="上架状态" filterable clearable>
		          <Option
		            v-for="(option, index) in goodsSkuShelfStatusSelect"
		            :value="option.value"
		            :key="index"
		          >{{option.displayValue}}</Option>
		        </Select>
		    
		</FormItem>
	
</i-col>
<i-col span="12">
	<FormItem label="属性编号"><Row>
	<i-col span="11">
	<FormItem prop="goodsCategoryAttributeAttrIdMin">
	<InputNumber v-model="searchForm.goodsCategoryAttributeAttrIdMin" placeholder="请输入开始属性编号" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="goodsCategoryAttributeAttrIdMax">
	<InputNumber v-model="searchForm.goodsCategoryAttributeAttrIdMax" placeholder="请输入结束属性编号" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="属性排序"><Row>
	<i-col span="11">
	<FormItem prop="goodsCategoryAttributeAttrOrderMin">
	<InputNumber v-model="searchForm.goodsCategoryAttributeAttrOrderMin" placeholder="请输入开始属性排序" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="goodsCategoryAttributeAttrOrderMax">
	<InputNumber v-model="searchForm.goodsCategoryAttributeAttrOrderMax" placeholder="请输入结束属性排序" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>
<i-col span="12">
<FormItem label="是否属性组合" prop="goodsCategoryAttributeIsAttrGroup">
    
        <Select v-model="searchForm.goodsCategoryAttributeIsAttrGroup" placeholder="是否属性组合" filterable clearable>
          <Option
            v-for="(option, index) in goodsCategoryAttributeIsAttrGroupSelect"
            :value="option.value"
            :key="index"
          >{{option.displayValue}}</Option>
        </Select>
    
</FormItem>
	
</i-col>
<i-col span="12">
	<FormItem label="属性名称" prop="goodsAttributeAttrName" label-for="goodsAttributeAttrName">
	<Input v-model="searchForm.goodsAttributeAttrName" element-id="goodsAttributeAttrName" placeholder="请输入属性名称" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="属性代码" prop="goodsAttributeAttrCode" label-for="goodsAttributeAttrCode">
	<Input v-model="searchForm.goodsAttributeAttrCode" element-id="goodsAttributeAttrCode" placeholder="请输入属性代码" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="数据类型" prop="goodsAttributeAttrType" label-for="goodsAttributeAttrType">
	<Input v-model="searchForm.goodsAttributeAttrType" element-id="goodsAttributeAttrType" placeholder="请输入数据类型" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="数据长度"><Row>
	<i-col span="11">
	<FormItem prop="goodsAttributeAttrLengthMin">
	<InputNumber v-model="searchForm.goodsAttributeAttrLengthMin" placeholder="请输入开始数据长度" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="goodsAttributeAttrLengthMax">
	<InputNumber v-model="searchForm.goodsAttributeAttrLengthMax" placeholder="请输入结束数据长度" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>
<i-col span="12">
		<FormItem label="是否必填" prop="goodsAttributeAttrRequired">
		    
		        <Select v-model="searchForm.goodsAttributeAttrRequired" placeholder="是否必填" filterable clearable>
		          <Option
		            v-for="(option, index) in goodsAttributeAttrRequiredSelect"
		            :value="option.value"
		            :key="index"
		          >{{option.displayValue}}</Option>
		        </Select>
		    
		</FormItem>
</i-col>
<i-col span="12">
<FormItem label="是否前端显示" prop="goodsAttributeAttrDisplay">
    
        <Select v-model="searchForm.goodsAttributeAttrDisplay" placeholder="是否前端显示" filterable clearable>
          <Option
            v-for="(option, index) in goodsAttributeAttrDisplaySelect"
            :value="option.value"
            :key="index"
          >{{option.displayValue}}</Option>
        </Select>
    
</FormItem>
	
</i-col>
<i-col span="12">
	<FormItem label="属性值" prop="goodsAttributeValueAttrValue" label-for="goodsAttributeValueAttrValue">
	<Input v-model="searchForm.goodsAttributeValueAttrValue" element-id="goodsAttributeValueAttrValue" placeholder="请输入属性值" clearable/>
</FormItem>
</i-col>
</Row>

            </Form>
            <div slot="footer">
                <Button type="text" size="large" @click="resetForm">清空</Button>
                <Button type="text" size="large" @click="cancelModal">取消</Button>
                <Button type="primary" size="large" @click="searchOkModal" :loading="loading.search">查询</Button>
            </div>
        </Modal>
    </div>
</template>

<script>
    import * as utils from '@/api/utils-v2'
    import * as ResponseStatus from '@/api/response-status'
    export default {
        name: 'GoodsSkuAttributeValueSearch',
        data() {
            return {
                modal: {
                    search: false
                },
                loading: {
                    search: false
                },
                urls: {
                    searchUrl: '/goods-sku-attr-val/admin/pager-cond'
                },
				dataDictCodes: ['IS_ACTIVE','GOODS_ATTRIBUTE_DISPLAY','GOODS_ATTRIBUTE_REQUIRED','GOODS_ATTRIBUTE_IS_GROUP','GOODS_SHELF_STATUS','SHOP_LEVEL'],
				dataDictItems: {},
				isActiveSelect:[],
				goodsAttributeAttrDisplaySelect:[],
				goodsAttributeAttrRequiredSelect:[],
				goodsCategoryAttributeIsAttrGroupSelect:[],
				goodsInfoShelfStatusSelect:[],
				goodsSkuShelfStatusSelect:[],
				goodsShopLevelSelect:[],
                searchForm: {
                    pageNo: 1,
                    pageSize: 10,
                    sortColumn: null,
                    sortOrder: null,
                    goodsInfoId: null,
goodsInfoIdMin: null, 
goodsInfoIdMax: null, 
goodsInfoShopId: null,
goodsInfoShopIdMin: null, 
goodsInfoShopIdMax: null, 
goodsInfoCategoryId: null,
goodsInfoCategoryIdMin: null, 
goodsInfoCategoryIdMax: null, 
goodsInfoTitle: null,
goodsInfoPicUrl: null,
goodsInfoBrand: null,
goodsInfoIntro: null,
goodsInfoShelfStatus: null,
goodsInfoShelfStatusMin: null, 
goodsInfoShelfStatusMax: null, 
goodsInfoSaleCount: null,
goodsInfoSaleCountMin: null, 
goodsInfoSaleCountMax: null, 
goodsInfoClickCount: null,
goodsInfoClickCountMin: null, 
goodsInfoClickCountMax: null, 
goodsShopLogo: null,
goodsShopTitle: null,
goodsShopLevel: null,
goodsShopLevelMin: null, 
goodsShopLevelMax: null, 
goodsSkuId: null,
goodsSkuIdMin: null, 
goodsSkuIdMax: null, 
goodsSkuPicUrl: null,
goodsSkuTitle: null,
goodsSkuPrice: null,
goodsSkuPriceMin: null, 
goodsSkuPriceMax: null, 
goodsSkuSalePrice: null,
goodsSkuSalePriceMin: null, 
goodsSkuSalePriceMax: null, 
goodsSkuStockCount: null,
goodsSkuStockCountMin: null, 
goodsSkuStockCountMax: null, 
goodsSkuShelfStatus: null,
goodsSkuShelfStatusMin: null, 
goodsSkuShelfStatusMax: null, 
goodsCategoryAttributeAttrId: null,
goodsCategoryAttributeAttrIdMin: null, 
goodsCategoryAttributeAttrIdMax: null, 
goodsCategoryAttributeAttrOrder: null,
goodsCategoryAttributeAttrOrderMin: null, 
goodsCategoryAttributeAttrOrderMax: null, 
goodsCategoryAttributeIsAttrGroup: null,
goodsCategoryAttributeIsAttrGroupMin: null, 
goodsCategoryAttributeIsAttrGroupMax: null, 
goodsAttributeAttrName: null,
goodsAttributeAttrCode: null,
goodsAttributeAttrType: null,
goodsAttributeAttrLength: null,
goodsAttributeAttrLengthMin: null, 
goodsAttributeAttrLengthMax: null, 
goodsAttributeAttrRequired: null,
goodsAttributeAttrRequiredMin: null, 
goodsAttributeAttrRequiredMax: null, 
goodsAttributeAttrDisplay: null,
goodsAttributeAttrDisplayMin: null, 
goodsAttributeAttrDisplayMax: null, 
goodsAttributeValueAttrValue: null,

                },
            }
        },
        computed: {},
        mounted() {
			            utils.getDataDict(this.dataDictCodes).then(response => {
			              if (response) {
			                this.dataDictItems = response
							utils.getSelectDictItems(this, 'IS_ACTIVE', 'goodsInfoIsActive','isActiveSelect')
							utils.getSelectDictItems(this, 'GOODS_ATTRIBUTE_DISPLAY', 'goodsAttributeAttrDisplay','goodsAttributeAttrDisplaySelect')
							utils.getSelectDictItems(this, 'GOODS_ATTRIBUTE_REQUIRED', 'goodsAttributeAttrRequired','goodsAttributeAttrRequiredSelect')
							utils.getSelectDictItems(this, 'GOODS_ATTRIBUTE_IS_GROUP', 'goodsCategoryAttributeIsAttrGroup','goodsCategoryAttributeIsAttrGroupSelect')
							utils.getSelectDictItems(this, 'GOODS_SHELF_STATUS', 'goodsSkuShelfStatus','goodsSkuShelfStatusSelect')
							utils.getSelectDictItems(this, 'GOODS_SHELF_STATUS', 'goodsInfoShelfStatus','goodsInfoShelfStatusSelect')
							utils.getSelectDictItems(this, 'SHOP_LEVEL', 'goodsShopLevel','goodsShopLevelSelect')
			              }
			            }).catch(error => {
			              console.log(error)
			            })
		},
        methods: {
            resetForm() {
                this.$refs.searchForm.resetFields()
            },
            cancelModal(modal) {
                this.modal.search = false
            },
            searchOkModal(modal) {
                this.modal.search = false
                this.$emit('searchTable', true)
            }
        }
    }
</script>

<style>
</style>